home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trusted Irix /B 4.0.4
/
Trusted-Irix B-4.0.1.iso
/
dist
/
eoe1.idb
/
usr
/
include
/
sys
/
entrypt.h.z
/
entrypt.h
Wrap
C/C++ Source or Header
|
1992-04-03
|
10KB
|
267 lines
#ifndef __SYS_ENTRYPT_H__
#define __SYS_ENTRYPT_H__
/**************************************************************************
* *
* Copyright (C) 1988, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/*
* Copyright 1985 by MIPS Computer Systems, Inc.
*/
#ident "$Revision: 1.24 $"
/*
* entrypt.h -- misc. defines of interest to standalones and kernels
*/
/*
* Prom entry points
*/
/*
* Return control to prom entry points
*
* RESET transferred to on hardware reset, configures MIPS boards,
* runs diags, check for appropriate auto boot action in
* "bootmode" environment variable and performs that action.
*
* EXEC called to utilize prom to boot new image. After the booted
* program returns control can either be returned to the
* original caller of the exec routine or to the prom monitor.
* (to return to the original caller, the new program must
* not destroy any text, data, or stack of the parent. the
* new programs stack continues on the parents stack.
*
* RESTART re-enter the prom command parser, do not reset prom state
*
* REINIT reinitialize prom state and re-enter the prom command parser
*
* REBOOT check for appropriate bootmode and perform, no configuration
* or diags run
*
* AUTOBOOT perform an autoboot sequence, no configuration or diags run
*
*/
#if IP5 && STANDALONE
#define PROM_ENTRY(x) (MONITOR_TEXT+((x)*8))
#else
#define PROM_ENTRY(x) (R_VEC+((x)*8))
#endif
#define PROM_RESET PROM_ENTRY(0) /* run diags, check bootmode, reinit */
#define PROM_EXEC PROM_ENTRY(1) /* load new program image */
#define PROM_RESTART PROM_ENTRY(2) /* re-enter monitor command loop */
#define PROM_REINIT PROM_ENTRY(3) /* re-init monitor, then cmd loop */
#define PROM_REBOOT PROM_ENTRY(4) /* check bootmode, no config */
#define PROM_AUTOBOOT PROM_ENTRY(5) /* autoboot the system */
/*
* these routines access prom "saio" routines, and may be used
* by standalone programs that would like to use prom io
*/
#define PROM_OPEN PROM_ENTRY(6)
#define PROM_READ PROM_ENTRY(7)
#define PROM_WRITE PROM_ENTRY(8)
#define PROM_IOCTL PROM_ENTRY(9)
#define PROM_CLOSE PROM_ENTRY(10)
#define PROM_GETCHAR PROM_ENTRY(11) /* getchar from console */
#define PROM_PUTCHAR PROM_ENTRY(12) /* putchar to console */
#define PROM_SHOWCHAR PROM_ENTRY(13) /* show a char visibly */
#define PROM_GETS PROM_ENTRY(14) /* gets with editing */
#define PROM_PUTS PROM_ENTRY(15) /* puts to console */
#define PROM_PRINTF PROM_ENTRY(16) /* kernel style printf to console */
/*
* prom protocol entry points
*/
#define PROM_INITPROTO PROM_ENTRY(17) /* initialize protocol */
#define PROM_PROTOENABLE PROM_ENTRY(18) /* enable protocol mode */
#define PROM_PROTODISABLE PROM_ENTRY(19)/* disable protocol mode */
#define PROM_GETPKT PROM_ENTRY(20) /* get protocol packet */
#define PROM_PUTPKT PROM_ENTRY(21) /* put protocol packet */
#if R2300
/*
* VME RMW routines
* Other CPUs do these in the kernel, but R2300 takes special care
*/
#define PROM_ORW_RMW PROM_ENTRY(22) /* OR-word RMW */
#define PROM_ORH_RMW PROM_ENTRY(23) /* OR-half RMW */
#define PROM_ORB_RMW PROM_ENTRY(24) /* OR-byte RMW */
#define PROM_ANDW_RMW PROM_ENTRY(25) /* AND-word RMW */
#define PROM_ANDH_RMW PROM_ENTRY(26) /* AND-half RMW */
#define PROM_ANDB_RMW PROM_ENTRY(27) /* AND-byte RMW */
#endif /* R2300 */
/*
* cache control entry points
* flushcache is called without arguments and invalidates entire contents
* of both i and d caches
* clearcache is called with a base address and length (where address is
* either K0, K1, or physical) and clears both i and d cache for entries
* that alias to specified address range.
*/
#define PROM_FLUSHCACHE PROM_ENTRY(28) /* flush entire cache */
#define PROM_CLEARCACHE PROM_ENTRY(29) /* clear_cache(addr, len) */
/*
* The following entry points are sole to reduce the size of the debug
* monitor and could be removed by including the appropriate code in the
* debugger
*
* Libc-ish entry points
*/
#define PROM_SETJMP PROM_ENTRY(30) /* save stack state */
#define PROM_LONGJMP PROM_ENTRY(31) /* restore stack state */
#define PROM_BEVUTLB PROM_ENTRY(32) /* utlbmiss boot exception vector */
#define PROM_GETENV PROM_ENTRY(33) /* get environment variable */
#define PROM_SETENV PROM_ENTRY(34) /* set environment variable */
#define PROM_ATOB PROM_ENTRY(35) /* convert ascii to binary */
#define PROM_STRCMP PROM_ENTRY(36) /* string compare */
#define PROM_STRLEN PROM_ENTRY(37) /* string length */
#define PROM_STRCPY PROM_ENTRY(38) /* string copy */
#define PROM_STRCAT PROM_ENTRY(39) /* string concat */
/*
* command parser entry points
*/
#define PROM_PARSER PROM_ENTRY(40) /* command parser */
#define PROM_RANGE PROM_ENTRY(41) /* range parser */
#define PROM_ARGVIZE PROM_ENTRY(42) /* tokenizer */
#define PROM_HELP PROM_ENTRY(43) /* prints help from command table */
/*
* prom commands
*/
#define PROM_DUMPCMD PROM_ENTRY(44) /* dump memory command */
#define PROM_SETENVCMD PROM_ENTRY(45) /* setenv command */
#define PROM_UNSETENVCMD PROM_ENTRY(46) /* unsetenv command */
#define PROM_PRINTENVCMD PROM_ENTRY(47) /* printenv command */
#define PROM_BEVEXCEPT PROM_ENTRY(48) /* general boot exception vector */
#define PROM_ENABLECMD PROM_ENTRY(49) /* enable console command */
#define PROM_DISABLECMD PROM_ENTRY(50) /* disable console command */
/*
* clear existing fault handlers
* used by clients that link to prom on situations where client has
* interrupted out of prom code and wish to reenter without being
* tripped up by any pending prom timers set earlier.
*/
#define PROM_CLEARNOFAULT PROM_ENTRY(51)/* clear existing fault handlers */
/*
* PROM_NOTIMPLEMENT is guaranteed to be not implemented so programs
* which link against various rev's of the prom can config to entry points
* which aren't implemented in earlier prom rev's. An entry point is
* guaranteed to be implemented if the 32 bit word at the prom entrypt
* is not equal to this entrypt.
*/
#define PROM_NOTIMPLEMENT PROM_ENTRY(52)/* guaranteed to be not implemented */
#define PROM_EADDR PROM_ENTRY(53) /* IP6 get phys ethernet addr */
#define PROM_DEXEC PROM_ENTRY(55) /* IP6 destructive prom exec */
#define PROM_SETNVRAM PROM_ENTRY(57) /* IP6 set nvram env variables */
/*
* PROM_NVRAM_TAB is used to copy the PROM's nvram table into the
* kernel so that the kernel can find the current offsets into
* nvram for the boot variables stored there.
*/
#define PROM_NVRAM_TAB PROM_ENTRY(58) /* IP12 get nvram table */
/*
* Restart block -- miscellaneous variables saved across prom/sash/kernel
* transitions.
*
*/
#define RESTART_MAGIC 0xfeedface
#define RESTART_CSUMCNT 32 /* chksum 32 words of restart routine */
#define RB_BPADDR (RESTART_ADDR+24)/* address of rb_bpaddr */
#define RB_MGADDR RESTART_ADDR /* address of rb_magic */
#ifdef LANGUAGE_C
/*
* args to promexec -- monitor support for loading new programs
*
* bootfiles should be specified as DEV(UNIT)FILE
* (e.g. dksc(0,1,8)ide)
*/
struct promexec_args {
char *pa_bootfile; /* file to boot (only some devices) */
int pa_argc; /* arg count */
char **pa_argv; /* arg vector */
char **pa_environ; /* environment vector */
int pa_flags; /* flags, (see below) */
};
/*
* promexec flags
*/
#define EXEC_NOGO 1 /* just load, don't transfer control */
struct restart_blk {
int rb_magic; /* magic pattern */
int (*rb_restart)(); /* restart routine */
int rb_occurred; /* to avoid loops on restart failure */
int rb_checksum; /* checksum of 1st 32 wrds of restrt */
char *rb_fbss; /* start of prom bss and stack area */
char *rb_ebss; /* end of prom bss and stack area */
/*
* These entries are for communication between the debug monitor
* and the client process being debugged
* NOTE: a return value of -1 from (*rb_vtop)() is distinguished
* to indicate that a translation could not be made.
*/
int (*rb_bpaddr)(); /* breakpoint handler */
int (*rb_vtop)(); /* virtual to physical conversion rtn */
int rb_flush; /* flush cache since breakpoints were
set */
int idbg_base; /* start of idbg table */
int brkpt_tbl;
int nametab; /* nametable address */
int dbstab; /* symbol table address */
int linetab; /* line number table address */
int kidbg_func; /* kernel idbg interface function */
int ktlbfix; /* kernel tlb fix */
#if IP6 || IP12 || IP17
int (*rb_printf)(); /* address of symmon's printf */
#endif
#if IP6 || IP12
int rb_flags; /* global flags for system */
struct promexec_args rb_peargs;
char rb_pebuff[512];
#endif
#ifdef IP5
int rb_filler[16]; /* so that bit mask isn't cksummed */
int rb_cpumask; /* bit mask of cpus present */
#endif
/*
* config table goes here
*/
};
#if IP6 || IP12
#define RB_GR1BAD 1 /* GR1 board failed diagnostics - don't use */
#endif
#endif /* LANGUAGE_C */
#ifdef IP5
/* Prom entry points for IP[579], which have symmon, etc. in prom */
#define IP5PROM_ENTRY(x) (R_VEC+((x)*8))
#define IP5PROM_RESET IP5PROM_ENTRY(0)/* run diags, check bootmode, reinit */
#define IP5PROM_PRINTF IP5PROM_ENTRY(1)/* regular printf */
#define IP5PROM_LPRINTF IP5PROM_ENTRY(2)/* loprintf, use 1st cache as stack */
#define IP5PROM_SYMMON IP5PROM_ENTRY(3)/* access to symmon */
#define IP5PROM_REBOOT IP5PROM_ENTRY(4)/* reload monitor */
#define IP5PROM_ATBOOT IP5PROM_ENTRY(5)/* reload monitor, call autoboot */
#define IP5PROM_BRKPT IP5PROM_ENTRY(6)/* symmon's brkpt handler */
#endif /* IP5 */
#endif /* __SYS_ENTRYPT_H__ */